<template>
  <div class="repair_report_detail">
    <div>
      <div class="ivu-table-wrapper">
        <div class="ivu-table ivu-table-default ivu-table-border">
          <div class="ivu-table-header">
            <table cellspacing="0" cellpadding="0" border="0" style="width: 100%;">
              <colgroup>
                <!-- <col width="266" />
                <col width="266" />-->
              </colgroup>
              <thead>
                <tr>
                  <th colspan="2">
                    <div class="ivu-table-cell">
                      <span class>机台程序上报详情</span>
                    </div>
                  </th>
                </tr>
              </thead>
            </table>
          </div>
          <div class="ivu-table-body">
            <table cellspacing="0" cellpadding="0" border="0" style="width: 100%;">
              <colgroup>
                <!-- <col width="266" />
                <col width="266" />-->
              </colgroup>
              <tbody class="ivu-table-tbody">
                <!---->
                <tr v-for="(item, index) in detailList" :key="index" class="ivu-table-row">
                  <td v-for="(list, k) in item" :key="k" class>
                    <div class="ivu-table-cell">
                      <span>{{list.label}}：{{list.value}}</span>
                    </div>
                  </td>
                  <!-- <td class>
                    <div class="ivu-table-cell">
                      <span>机台名称：{{detail.price}}</span>
                    </div>
                  </td> -->
                </tr>

              </tbody>
            </table>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
// pointUpdate couponList
// import { getShopDetail, couponDetail } from '@/api/market/pointshop'
// import { getMemberLevelList } from '@/api/member/index.js'
export default {
  name: 'repair_report_detail',
  data () {
    return {
      detail: {},
      coupon: {},
      memberLevel: [{ memberLevelName: '无限制', memberLevel: 0 }],
      detailList: [
        [ { key: 'machineCategoryName', value: '', label: '机台分类' }, { key: 'machineInstanceName', value: '', label: '机台名称' } ],
        [ { key: 'persistentWinningPer', value: '', label: '固定中奖率' }, { key: 'randomWinningPer', value: '', label: '随机中奖率' } ],
        [ { key: 'memberWinningPer', value: '', label: '会员中奖率' }, { key: 'winningGroup', value: '', label: '机台分组' } ],
        [ { key: 'normalState', value: '', label: '常规模式' }, { key: 'freeState', value: '', label: '免费模式' } ],
        [ { key: 'giftState', value: '', label: '保送模式' }, { key: 'highVoltage', value: '', label: '强电压' } ],
        [ { key: 'mediumVoltage', value: '', label: '中电压' }, { key: 'weakVoltage', value: '', label: '弱电压' } ],
        [ { key: 'highVoltageDelay', value: '', label: '强电压延时' }, { key: 'mediumVoltageDelay', value: '', label: '中电压延时' } ],
        [ { key: 'weakVoltageDelay', value: '', label: '弱电压延时' }, { key: 'actionDelay', value: '', label: '下落时间' } ],
        [ { key: 'manualControl', value: '', label: '空中取物' }, { key: 'playingTime', value: '', label: '游戏时间' } ],
        [ { key: 'ropeLength', value: '', label: '放线长度' }, { key: 'music', value: '', label: '音乐开关' } ],
        [ { key: 'giftCounter', value: '', label: '礼品掉落' }, { key: 'coins', value: '', label: '每局币数' } ],
        [ { key: 'crownBlockSpeed', value: '', label: '天车移动速度' }, { key: 'createTime', value: '', label: '上报时间' } ]
      ]
    }
  },
  computed: {
  },
  created () {
    if (sessionStorage.getItem('repair_report_detail_data')) {
      let detail = JSON.parse(sessionStorage.getItem('repair_report_detail_data'))
      let datailKeys = Object.keys(detail)
      this.detailList = this.detailList.map(item => {
        item.forEach(ele => {
          if (datailKeys.includes(ele.key)) {
            ele.value = detail[ele.key]
          }
        })
        return item
      })
    }
  },
  methods: {

  }
}
</script>

<style lang="less" scoped>
.repair_report_detail {
  // width: 960px;
  margin: 0 auto;
  padding: 40px 80px;

  // margin-top: 100px;
  .ivu-table-border .table-border-none th,
  .ivu-table-border .table-border-none td {
    border-right: none;
  }
  .ivu-table .table-border-none th,
  .ivu-table .table-border-none td {
    border-bottom: none;
  }
  .imageUrl {
    max-width: 300px;
    max-height: 400px;
  }
  .ivu-table-cell-img {
    padding-top: 15px;
    padding-bottom: 15px;
  }
}
</style>
